package edu.tec.mty.test.nemesis.players;

import edu.tec.mty.core.Commands;
import edu.tec.mty.core.modules.Game;
import edu.tec.mty.core.modules.Self;
import edu.tec.mty.core.modules.models.Position;
import edu.tec.mty.players.PlayerActions;

public class Dummy extends PlayerActions {
	
	public Dummy(Commands commands, Game game, Self player) {
		super(commands, game, player);
	}

	@Override
	public void goTo(Position position) {
		double angleToTurn = player.getPosition().getAngleFromBodyTo(position);
		double distance = player.getPosition().getDistanceTo(position);
		if (Math.abs(angleToTurn) > 10) {
			commands.turn(angleToTurn/3.0);
		} else {
			if (distance > 1.0) {
				commands.dash(50.0, 0.0);
			}
		}
	}
	
}
